from rest_framework import serializers
from .models import *

class UserModelSerializer(serializers.ModelSerializer):

    class Meta:
        model = User
        fields = '__all__'
class CouponModelSerializer(serializers.ModelSerializer):

    class Meta:
        model = Coupon
        fields = '__all__'
class ProductModelSerializer(serializers.ModelSerializer):

    class Meta:
        model = Product
        fields = '__all__'
class CartModelSerializer(serializers.ModelSerializer):

    class Meta:
        model = Cart
        fields = '__all__'
class CartShowModelSerializer(serializers.ModelSerializer):
    product = ProductModelSerializer()
    user = UserModelSerializer()

    class Meta:
        model = Cart
        fields = '__all__'




